ratelimit: Implement rate limit for credit2 scheduler
authorAnshul Makkar <anshul.makkar@citrix.com>
Wed, 3 Aug 2016 12:35:22 +0000 (13:35 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 3 Aug 2016 13:14:08 +0000 (14:14 +0100)
commit2615485905a34da095a2453b3991c5adba7f33da
treeb18760f892e915bea6bb54907fad3ae187a8eb78
parentf6bde162c4165f7e83f9618cc13dc3aa2af4b6dd
ratelimit: Implement rate limit for credit2 scheduler

Rate limit assures that a vcpu will execute for a minimum amount of
time before being put at the back of a queue or being preempted by
higher priority thread.

It introduces context-switch rate-limiting. The patch enables the VM
to batch its work and prevents the system from spending most of its
time in context switches because of a VM that is waking/sleeping at
high rate.

ratelimit can be disabled by setting it to 0.

Signed-off-by: Anshul Makkar <anshul.makkar@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/sched_credit2.c